package com.xiaotou.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaotou.db.dao.CommonDAO;
import com.xiaotou.db.pojo.Item;

@Service
public class ItemService {

	private CommonDAO commonDao;

	@Transactional(readOnly = true)
	public List<Item> getAllItem() {
		return this.commonDao.findByNamedQuery(Item.FIND_ALL);
	}

	public void setCommonDao(CommonDAO commonDao) {
		this.commonDao = commonDao;
	}
}
